-- GENERATED SPELL FOR [Phantasmal Mammoth] --


function spell0_27642(pUnit, Event) --@Charge,n/a--
pUnit:FullCastSpellOnTarget(32323,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27642', 2273, 1)
end

function spell1_27642(pUnit, Event) --@Trample,Self--
pUnit:FullCastSpellOnTarget(51253,pUnit)
pUnit:RegisterEvent('Sorts_27642', 660, 1)
end

function Sorts_27642(pUnit, Event)
local choix_sorts_27642 = math.random(0, 1)
if choix_sorts_27642 == 0 then
pUnit:RegisterEvent('spell0_27642', 1, 1)
end
if choix_sorts_27642 == 1 then
pUnit:RegisterEvent('spell1_27642', 1, 1)
end
end

function mob27642_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_27642', math.random(1500, 3000), 1)
end

function mob27642_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27642_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27642_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(27642, 1, 'mob27642_Action')
RegisterUnitEvent(27642, 2, 'mob27642_Leave')
RegisterUnitEvent(27642, 3, 'mob27642_Kill')
RegisterUnitEvent(27642, 4, 'mob27642_Die')
